<?php 
class send_models_email extends CI_Model{
	public function __construct(){
		$this->load->database();
	}
	public function add($email) {

		$email->date=strtotime('now');
		$email->ip=$this->input->ip_address();
	   	$this->db->insert('email_sent', $email);
	   	return $this->db->insert_id();
	}
}